package com.personal.kotlinmvptest.entity

import android.os.Parcel
import android.os.Parcelable
import java.io.Serializable

/**
 * @Description 建造者人实体
 *
 * @author taodq
 * @Date 2019-07-15.
 */
data class Personal(val name: String, val age: Int?): Serializable{

    class Builder {
        private lateinit var name: String
        private var age: Int = 0

        fun create(): Personal {
            return Personal(name, age)
        }

        fun setName(name: String): Builder {
            this.name = name
            return this
        }

        fun setAge(age: Int): Builder {
            this.age = age
            return this
        }
    }

    override fun toString(): String {
        return "Personal(name='$name', age=$age)"
    }


}